package headfirst.factory.pizzastore;

import headfirst.factory.pizza.BavarianPizza;
import headfirst.factory.pizza.Pizza;
import headfirst.factory.topingfactory.BavarianPizzaToppingFactory;
import headfirst.factory.topingfactory.PizzaToppingFactory;

public class BavarianPizzaStore extends PizzaStore {

	protected Pizza createPizza(String item) {
		Pizza pizza = null;
		PizzaToppingFactory ingredientFactory = new BavarianPizzaToppingFactory();
			
		if (item.equals("bavarian")) {
			pizza = new BavarianPizza(ingredientFactory);
			pizza.setName("Prof. Bruegge Style Bavarian Pizza");
		}
		
		return pizza;
	}
	
}
